{extend name="public:base" /}
{block name="head"}
<link href="__PUBLIC__/view_res/mobile/css/wshop_companyreg.css" type="text/css" rel="Stylesheet" />
<link href="__PUBLIC__/jquery-weui/dist/lib/weui.min.css" type="text/css" rel="Stylesheet" />
<link href="__PUBLIC__/jquery-weui/dist/css/jquery-weui.min.css" type="text/css" rel="Stylesheet" />
<script src="__PUBLIC__/jquery-weui/dist/js/jquery-weui.min.js"></script>
<link href="__PUBLIC__/view_res/mobile/css/cart.css" type="text/css" rel="Stylesheet" />
<link href="__PUBLIC__/jquery-weui/dist/lib/weui.min.css" type="text/css" rel="Stylesheet" />
<link href="__PUBLIC__/jquery-weui/dist/css/jquery-weui.min.css" type="text/css" rel="Stylesheet" />
<script src="__PUBLIC__/jquery-weui/dist/lib/fastclick.js"></script>
<script src="__PUBLIC__/jquery-weui/dist/js/jquery-weui.min.js"></script>
<script src="__PUBLIC__/jquery-weui/dist/js/city-picker.js"></script>
<script src="__PUBLIC__/js/jquery/jquery-migrate-1.2.1.min.js"></script>
<script src="__PUBLIC__/artTemplate/template.js"></script>
<script src="__PUBLIC__/view_res/mobile/load_list.js"></script>
<link href="__PUBLIC__/view_res/mobile/css/uc.css" type="text/css" rel="Stylesheet" />
{/block} 

{block name="header"}
{include file="public/top-nav" /}
{/block}

{block name="content"}
<style>
	body {
		background : none;
	}
</style>
<!-- from -->
<form id="login-wrap">
    <header class="Thead">姓名</header>
    <div style="margin:0 10px;">
        <div class="gs-text">
            <input type="text" name="idcardname" value=""  tabindex="2" placeholder="请输入本人身份证上的名字" />
        </div>
    </div>

    <header class="Thead">身份证号</header>
    <div style="padding:0 10px;">
        <div class="gs-text">
            <input type="text" name="idcard" value=""  tabindex="3" placeholder="请输入本人身份证号" />
        </div>
    </div>	

</form>

<a class="button green" href="javascript:;" id="reg-btn" style="background: #e4383b">确认提交</a>
<p class="weui_cells_tips">注意：身份证信息提交后，不能再修改，请仔细检查后提交！</p>
<p class="weui_cells_tips">必须与交易所绑定的身份证信息保持一致！</p>
{/block}
{block name="script"}
<script>
        {notempty name='info'}
        
            alert('{$info}');
        
        {/notempty}

$('#reg-btn').click(function(){
	var name = $('input[name="idcardname"]').val();
	var idcard = $('input[name="idcard"]').val();
	if (name == '' || name == null || name == 'undefined') {
		alert('请输入身份证上的名字');
		return;
	}
	if (idcard == '' || idcard == null || idcard == 'undefined') {
		alert('请输入身份证号');
		return;
	}
	$.post(
			'{:url("user/updateidcard")}',

			$('input[type="tel"],input[type="text"],input[type="hidden"]'),
			function(d){
				if(d.error){
					$.toast(d.error, "forbidden");
				}else if(d.success){
					$.toast(d.success);

					setTimeout(function (){
						history.go(-1);
					},2000);
				}
			}
	);
});
</script>

{/block}